# Maintainer: George Rawlinson <grawlinson@archlinux.org>

pkgname=python-pydrive2
_pkgname="${pkgname#python-}"
pkgver=1.15.0
pkgrel=2
pkgdesc='Google Drive API Python wrapper library (maintained fork of PyDrive)'
arch=('any')
url='https://github.com/iterative/PyDrive2'
license=('Apache')
depends=(
  'python'
  'python-google-api-python-client'
  'python-oauth2client'
  'python-pyaml'
  'python-pyopenssl'
)
makedepends=(
  'git'
  'python-build'
  'python-installer'
  'python-wheel'
  'python-setuptools'
  'python-setuptools-scm'
)
_commit='b95c9536b9c4069e4ee6cb3d78671c525fd901e6'
source=("$pkgname::git+$url#commit=$_commit")
b2sums=('SKIP')

pkgver() {
  cd "$pkgname"

  git describe --tags | sed 's/^v//'
}

build() {
  cd "$pkgname"

  python -m build --wheel --no-isolation
}

package() {
  cd "$pkgname"

  python -m installer --destdir="$pkgdir" dist/*.whl
}
